<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
<script>
    function unite(arr1, arr2, arr3) {
        var args = Array.from(arguments);
        var arr = args.reduce(function (prev, cur) {
            return prev.concat(cur);
        });
        return arr.filter(function (item, index, arr) {
            return arr.indexOf(item) === index;
        });
    }


    unite([1, 3, 2], [5, 2, 1, 4], [2, 1]);
</script>
</body>
</html>